package com.tjshop.android.model.tj.json;

import java.io.Serializable;
import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.tjshop.android.model.BaseObject;
import com.tjshop.android.model.keyPair;

public class Goods extends BaseObject implements Serializable {
	private String goods_id;// "goods_id": "1561",
	private String goods_name;// "goods_name": "云丰 板蓝根颗粒 10g*20袋",
	private String cat_id;// "cat_id": "1",
	private String shop_price;// "shop_price": "8.20",
	private String goods_thumb;// "goods_thumb":
								// "images/201501/thumb_img/1561_thumb_G_1422308568938.jpg",
	private String amount;// "amount": ""

	public String getGoods_id() {
		return goods_id;
	}

	public void setGoods_id(String goods_id) {
		this.goods_id = goods_id;
	}

	public String getGoods_name() {
		return goods_name;
	}

	public void setGoods_name(String goods_name) {
		this.goods_name = goods_name;
	}

	public String getCat_id() {
		return cat_id;
	}

	public void setCat_id(String cat_id) {
		this.cat_id = cat_id;
	}

	public String getShop_price() {
		return shop_price;
	}

	public void setShop_price(String shop_price) {
		this.shop_price = shop_price;
	}

	public String getGoods_thumb() {
		return goods_thumb;
	}

	public void setGoods_thumb(String goods_thumb) {
		this.goods_thumb = goods_thumb;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public void parse(JSONObject category) {
		setAmount(getString(category, "amount"));
		setCat_id(getString(category, "cid"));
		setGoods_id(getString(category, "gid"));
		setGoods_name(getString(category, "gname"));
		setGoods_thumb("http://" + getString(category, "path")
				+ getString(category, "thumb"));
		setShop_price(getString(category, "price"));
	}

	@Override
	public void parse(JSONArray data) {
		// TODO Auto-generated method stub

	}

}
